home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 June / MacFormat 25.iso / Shareware City / Developers / macgzip_03b2-src / macos / Posix / Posix Includes / sys⁄stat.h < prev    next >
Encoding:
Text File  |  1994-10-18  |  1.1 KB  |  55 lines  |  [TEXT/KAHL]

  1. /* $Id: $ */
  2.  
  3. /* Include file belonging to stat emulator.
  4.    Public domain by Guido van Rossum, CWI, Amsterdam (July 1987). */
  5.  
  6. #pragma once
  7.  
  8. /*
  9.  * stat defined in think c 7, but it uses mac dates
  10.  */
  11.  
  12. #define    stat UnixStat
  13. #define    fstat UnixFStat
  14.  
  15. /*
  16.  * La vieja zingara me lo advirtio:
  17.  * Ojos turquesa son de traicion
  18.  */
  19.  
  20. #include <Files.h>
  21.  
  22. struct stat {
  23.     unsigned short st_dev;
  24.     unsigned short st_ino;
  25.     unsigned short st_mode;
  26.     unsigned short st_nlink;
  27.     unsigned int   st_uid;
  28.     unsigned int   st_gid;
  29.     unsigned short st_rdev;
  30.     unsigned long st_size;
  31.     unsigned long st_rsize; /* Resource size -- nonstandard */
  32.     unsigned long st_atime;
  33.     unsigned long st_mtime;
  34.     unsigned long st_ctime;
  35.     FInfo st_FlFndrInfo;        /* File type, creator, etc */
  36. };
  37.  
  38.  
  39. int fstat (int __handle, struct stat *__statbuf);
  40. int stat  (char *__path, struct stat *__statbuf);
  41.  
  42.  
  43. #define S_IFMT    0170000L
  44. #define S_IFDIR    0040000L
  45. #define S_IFREG 0100000L
  46. #define S_IREAD    0400
  47. #define S_IWRITE   0200
  48. #define S_IEXEC    0100
  49.  
  50. #define S_IFIFO 010000  /* FIFO special */
  51. #define S_IFCHR 020000  /* character special */
  52. #define S_IFBLK 030000  /* block special */
  53.  
  54.  
  55.